package com.jintian.smart.base.api.message.entity;

import com.jintian.smart.kernel.core.domain.IEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.beetl.sql.annotation.builder.FillStrategy;
import org.beetl.sql.annotation.builder.UpdateTime;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Table;

import java.time.LocalDateTime;

/**
 * 通知公告
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "mms_notice_view_record")
public class NoticeViewRecordEntity implements IEntity {
    @AssignID("snowid")
    private Long id;

    /**
     * 通知主键
     */
    private Long noticeId;

    /**
     * 接收人主键
     */
    private Long employeeId;

    /**
     * 浏览次数
     */
    private Integer pageViewCount;

    /**
     * 首个IP
     */
    private String firstIp;

    /**
     * 首个用户代理
     */
    private String firstUserAgent;

    /**
     * 最后IP
     */
    private String lastIP;

    /**
     * 最后用户代理
     */
    private String lastUserAgent;

    /**
     * 更新时间
     */
    @UpdateTime(FillStrategy.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @UpdateTime(FillStrategy.INSERT)
    private LocalDateTime createTime;
}
